package com.bamboowind.listener;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Author cpw
 * @Date 2022/11/3 10:34
 * @Describe: 发布确认高级 消费者
 */
@Slf4j
@Component
public class ConfirmListener {

    @RabbitListener(queues = "confirm_queue")
    public void receiveMessage(Message message) {
        String msg = new String(message.getBody());
        log.info("接收到队列的消息为:{}", msg);
    }
}
